Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lambda] Send NoOp segment when trace header is incomplete #403

Merged
merged 3 commits into from
May 6, 2024

Conversation

majanjua-amzn
Copy link
Contributor

When using Lambda, if there is no trace header or an invalid one we would like to send a NoOp segment instead of a Facade segment so that customers can call X-Ray SDK APIs and utilize X-Ray SDK without any output. This will not send data to X-Ray nor inject X-Ray trace headers downstream.

Description of changes:

  • Modify condition to create a NoOp segment when trace header is "initializing", i.e. it is incomplete
  • Ensure trace entity is cleared when ending the segment
  • Make NoOpSegment public for the above changes
  • Update unit tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@majanjua-amzn majanjua-amzn requested a review from a team as a code owner May 6, 2024 20:31
Copy link
Contributor

@wangzlei wangzlei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wangzlei wangzlei merged commit c275035 into aws:master May 6, 2024
6 checks passed
majanjua-amzn added a commit to majanjua-amzn/aws-xray-sdk-java that referenced this pull request Jul 12, 2024
wangzlei pushed a commit that referenced this pull request Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants